home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / shapeocx / readme.txt < prev    next >
Encoding:
Text File  |  1999-07-25  |  6.8 KB  |  141 lines

  1. Introduction:
  2.   ShapeX.ocx version1.0 contains two controls, ShapeForm and ShapeButton. It's for used 
  3. in VB6, Windows95/98 or Windows NT4.0. Need VB6 run time DLL. 
  4.  
  5.   By using ShapeForm, you can visually design a Form with any shape by simply put a 
  6. ShapeForm control on the it, set ShapeForm's Picture property, all pixels with a 
  7. specified color or within a tolerance of the specified color will be excluded 
  8. and a region will created. The Form which the ShapeForm control placed on will be 
  9. shaped into the created region and will fit exactly to the picture shown on it. 
  10. All can do with no code.
  11.   ShapeButton acts as a CommandButton or CheckBox except that it can have any shape.
  12.  
  13. Features of ShapeX
  14.   1. Setting the Picture property of ShapeForm to a bmp, gif or jpeg file, from which 
  15. a region can be created and will be used to shape the Form. The picture will stretech 
  16. automaticly to fit the size of the ShapeForm control.
  17.   2. Supports switch region of the Form between shaped and regular (or rectangle) in 
  18. both design time and run time.
  19.   3. Supports switch Form from one shape to another in both design time and run time 
  20. if you put more than one ShapeForm controls on the it.
  21.   4. By setting NormalPicture property to a bmp, gif or jpeg file, ShapeButton can 
  22. create a region which used to shape itself. 
  23.   5. DownPicture and DisablePicture properties let the ShapeButton control have different 
  24. look when be clicked or disabled.
  25.   6. ShapeButton can act as CommandBotton or CheckBox (sticky) by set the value of its 
  26. ButtonStyle property.
  27.   7. Region data is got in design time and bounded with exe file, so the switch and 
  28. show is fast.
  29.   8. All visual design supported. You can move or resize the control, process the region 
  30. data in its property page, the final appearence of your application can be adjusted and 
  31. seen in designed time, or you can dynamically modify the Form's or the ShapeButton's region 
  32. in run time. 
  33.  
  34. Installation
  35.   There is an example to show how to use ShapeX.ocx control, which named TestShapeX, with 
  36. its Setup program and source code. If you run the Setup then ShapeX.ocx will be registered 
  37. to your machine. The example need VB6 run time dll which is not included in the Setup.
  38.  
  39. Registration information
  40.   ShapeX.ocx is a shareware, you can try it freely in 30 days, then if you do not register, 
  41. you should remove it from your machine. If you still want to use it over 30 days, and/or 
  42. you have develop your own software which used any functions of it and/or you want to  
  43. re-distrubute it with your application, then you need to register. 
  44.   Registration fee is US $28.00. If you do not register, however, ShapeX.ocx is still fully 
  45. functional and without expiration, with on message nor prompt. Pay for something useful you got 
  46. from others is fair, isn't it?
  47.  
  48.   Any question or comment please contact me:
  49.     chenggan@public.cta.cq.cn
  50.   To register, send check to the address:
  51.     Chen Gang
  52.     Computer Center,Chongqing Publishing House
  53.     No.205, 2nd Changjiang Road, Chongqing 400016
  54.     People's Republic of China 
  55.  
  56. How to use
  57.   Put a ShapeForm control on a Form, assign the its Picture Property, right click the control 
  58. to enter its property page, you can set the TransparentColor, DeltaR, DeltaG and DeltaB 
  59. properties in the property page. After click OK or Apply Button of the property page, a region 
  60. created. ShapeForm control will set the Form's shape to the created region if the Active 
  61. property of the control is True, 
  62.   ShapeButton's usage is just the same, except that it shapes itself, not the Form.
  63.   In designe time, TransparentColor, DeltaR, DeltaG and DeltaB properties can only be 
  64. changed by using property page.
  65.   In run time, you can change them by code.
  66.   
  67. Properties and methods for ShapeForm
  68. Active Property:
  69.   Decides whether or not the region data take into effect. In design time, if you move 
  70. FormShape control after region created, remember to switch this property to False and then 
  71. True, in order to let its picture shown fits the already created region. 
  72.     Example:
  73.     ShapeForm1.Active=True ' shape the Form.
  74.     ShapeForm1.Active=false ' set the Form's look to regular (rectangle).
  75.  
  76. Picture Property:
  77.   The region data will be retrieved from the this property.
  78.  
  79. TransparentColor Property:
  80.   The pixles with the same color or fall in the torlerance will be excluded from the created 
  81. region. 
  82.  
  83. DeltaR, DeltaG, DeltaB Properties:
  84.   Define the tolerance. If the differences between a pixle's R, G, B values and TransparentColor 
  85. property's R, G, B values are bigger than -DeltaR, -DeltaG, -DeltaB and less than DeltaR, 
  86. DeltaG, DeltaB respectively, this pixle will be treated as a transparent color and excluded 
  87. from the region. The bigger the values are, the less pixles will the finally created region 
  88. contain.
  89.   If you assign new values to DeltaR, DeltaG, DeltaB in run time, the new values must be in 0 
  90. to 100, otherwise it will be ignnored, no warn nor message given and the properties you intend 
  91. to assign to remain unchanged.
  92.  
  93. SendToBack Method: 
  94.   Change the Z-order of the ShapeForm. When there exist more than one ShapeForm controls, use 
  95. this method and Active property to switch the Form's region in run time, so you can dynamically
  96. change the appearence of your application. 
  97.   REMEMBER that ShapeForm control should be put directly on Form as a direct child, not as a 
  98. child of another ShapeForm control. 
  99.     Example:
  100.     'Next two lines set the Form's look to ShapeForm1 control
  101.     ShapeForm2.SendToBack 
  102.     ShapeForm1.Active=True
  103.  
  104.         'Next two lines set the Form's look to ShapeForm2 control
  105.     ShapeForm1.SendToBack 
  106.     ShapeForm2.Active=True
  107.  
  108. SetRegion Method:
  109.   Retrieve and create the region. It is called when click the OK or Apply button from the 
  110. property page in design time. If the region created success, the method return True, else 
  111. an error will raise, this usually caused by lack of memory. You can also call this method 
  112. from your code. 
  113.   When you resize ShapeForm control or change the TransparentColor, DeltaR, DeltaG, 
  114. DeltaB, Picture properties of it, you need to call this method, otherwise the region 
  115. will not change and so the picture shown on it may not fit properly to the region.
  116.  
  117. Properties and methods for ShapeButton
  118. Down Property:
  119.   Indicate the ShapeButton is pressed or not.    
  120.  
  121. Picture Property:
  122.   Picture shown on the ShapeButton in normal state (not pressed nor disabled), the region 
  123. data will be created from it.
  124.  
  125. DownPicture Property:
  126.   Picture shown on the ShapeButton when pressed.
  127.  
  128. DisablePicture Property:
  129.   Picture shown on ShapeButton when disabled.
  130.  
  131. TransparentColor,DeltaR,DeltaG and DeltaB properties: 
  132.   Same as of in ShapeForm.
  133.  
  134. ButtonStyle Property:
  135.   It can be 0-NormalButton (act as a CommandButton) or 1-CheckButton ( act as a CheckBox).
  136.  
  137. SetRegion Method:
  138.   Just the same of in ShapeForm.
  139.  
  140.  
  141.